﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditUserAccount.aspx.cs"
    Inherits="Secured_EditUserAccount" MasterPageFile="~/Layout.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolder1" runat="Server">
    <div style="font-size: large">
        Edit User Account
    </div>
    <br />
    <div>
        <asp:Literal ID="ltMsg" runat="server" />
    </div>
    <br />
    <div>
        <asp:FormView ID="fvEditAccount" runat="server">
            <ItemTemplate>
                <table width="auto">
                    <tr>
                        <td>
                            <strong>UserID:</strong>
                        </td>
                        <td>
                            <%# Eval("UserID") %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>UserName:</strong>
                        </td>
                        <td>
                            <%# Eval("UserName") %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>First Name: </strong>
                        </td>
                        <td>
                            <asp:TextBox ID="txtFirstName" runat="server" Text='<%# Eval("FirstName") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Last Name:</strong>
                        </td>
                        <td>
                            <asp:TextBox ID="txtLastName" runat="server" Text='<%# Eval("LastName") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Display Name:</strong>
                        </td>
                        <td>
                            <asp:TextBox ID="txtDisplayName" runat="server" Text='<%# Eval("DisplayName") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Role:</strong>
                        </td>
                        <td>
                            <asp:DropDownList ID="cmbUserRole" runat="server" SelectedValue='<%# Bind("Role") %>'>
                                <asp:ListItem Text="Admin" Value="Admin" />
                                <asp:ListItem Text="Normal" Value="Normal" />
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>E-Mail Address:</strong>
                        </td>
                        <td>
                            <asp:TextBox ID="txtEMailAddr" runat="server" Text='<%# Bind("EmailAddr") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Force Password Change:</strong>
                        </td>
                        <td>
                            <asp:CheckBox ID="chkForcePasswordChange" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Approved:</strong>
                        </td>
                        <td>
                            <asp:CheckBox ID="chkIsApproved" runat="server" Checked='<%# Bind("IsApproved") %>' />
                        </td>
                    </tr>
                </table>
                <hr />
                <asp:Button ID="btnBack" runat="server" Text="Back" onclick="btnBack_Click" />&nbsp;
                <asp:Button ID="btnSaveChanges" runat="server" Text="Save Changes" 
                    CommandName="SaveChanges" oncommand="btnSaveChanges_Command"/>
            </ItemTemplate>
        </asp:FormView>
    </div>
</asp:Content>
